<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>路径管理</title>
#include("../jscss.html")
<script type="text/javascript">
	$(function(){
		$('#bankNetwork').combobox({
	    	url:'bankNetworkList',
	    	valueField:'id',
	    	textField:'network',
	    	value:"#(networkinfo.id??0)"
	});
		$('#bankNetwork2').combobox({
	    	url:'bankNetworkListMain',
	    	valueField:'id',
	    	textField:'network',
	    	value:"#(networkinfo.superiorID??0)"
	});
		$('#bussiness').combobox({
	    	url:'bussinessList',
	    	valueField:'id',
	    	textField:'bussiness',
	    	value:"#(bussiness.bussinessID??0)"
	});
	});
	function newPath(){
		$('.path:last').append("<br>"+
         " <li class=\"path\"> " +
           " <span>" +
           "  途经网点 " +
           " </span>" +
          " <input  class=\"easyui-combobox\" name=\"emsNetwork\" data-options=\"required:true,valueField:\'id\',textField:\'network\',url:\'emsNetworkList\'\">"+
          "</li>");
		$('.easyui-combobox:last').combobox({
	    	url:'emsNetworkList',
	    	valueField:'id',
	    	textField:'network',
		});
	}
	function delPath(){
		$('.path:last').remove();
	}
	function catPath(){
		var x=document.getElementsByName("emsNetwork");
		var pathstr="";
		pathstr+=$("#bankNetwork").combobox('getValue');
		pathstr+="-";
		for (var i=0;i<x.length;i++)
		{
		pathstr+=x[i].value;
		pathstr+="-";
		}
		pathstr+=$("#bankNetwork2").combobox('getValue');
		bussiness = $("#bussiness").combobox('getValue');
		window.location.replace('setPath?pathstr='+pathstr +'&bussiness=' + bussiness);
	}
</script>
</head>
<body>
		<div>
			<form id="search-form">
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" onclick="newPath()">添加途经网点</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" id="del" onclick="delPath()">删除途经网点</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" id="edite" onclick="catPath()">提交</a>
			</form>
		</div>
	 <div class="time-line-wrap">
        <ul id="netpath">
        <br>
          <li class="source">
            <span>
              始发网点
            </span>
            <input id="bankNetwork" name="packageinfo.networkID" data-options="required:true"></input>
          </li>
          <br>
          <li class="path">
            <span>
             途经网点 
            </span>
           <input  class="easyui-combobox" name="emsNetwork" data-options="required:true,valueField:'id',textField:'network',url:'emsNetworkList'">
          </li>
          <br>
          <li class="destination">
            <span>
              目的网点
            </span>
            <input id="bankNetwork2" name="packageinfo.networkID" data-options="required:true"></input>
          </li>
          <li class="bussiness">
            <span>
              目的网点
            </span>
            <input id="bussiness" name="packageinfo.networkID" data-options="required:true"></input>
          </li>
        </ul>
      </div>
</body>
</html>